package com.wyix.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author wangdx
 * @since 2025/8/8
 */
@Controller
public class HomeController {

    @GetMapping("/")
    public String home(Model model) {
        model.addAttribute("title", "首页");
        model.addAttribute("message", "欢迎使用Spring MVC注解配置项目！");
        return "home";
    }

    @GetMapping("/about")
    public String about(Model model) {
        model.addAttribute("title", "关于我们");
        model.addAttribute("content", "这是一个基于Spring MVC注解配置的完整示例项目");
        return "about";
    }
}
